Convert Column Type

Command Prototype

Datatable.ConvertColumnDataType(dtTable,column,strType,bRaiseExcept,defaultValue)

Command Description

Convert the data type of a database column

Parameter Description
Required Parameter
dtTable--The datatable with columns to be modified
column--The data column to be converted, you can write a single column name, or write multiple column names at a time using an array
strType--The target data type to convert to
bRaiseExcept--Whether to throw an exception when the conversion fails
defaultValue--The value to be filled when type conversion fails. Valid only when no exception is thrown when the conversion fails

results matching ""

    No results matching ""